From 0fd51b7e404489b8728446b8dbe9f93552db1ae1 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Tue, 28 Apr 2009 23:49:44 +0000 Subject: [PATCH] Uncommitted stuff still in my working copy: * Logic for disabling email fields for unauthenticated addresses. * Remove float styling for fieldsets in preferences form, ugly and annoying. --- includes/Preferences.php | 11 ++++++++++- skins/monobook/main.css | 19 ++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/includes/Preferences.php b/includes/Preferences.php index 5d5362ed43..f18918fc9b 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -286,6 +286,8 @@ class Preferences { global $wgEnableEmail, $wgEnableUserEmail, $wgEmailAuthentication; + $disableEmailPrefs = false; + if ( $wgEmailAuthentication ) { if ( $user->getEmail() ) { if( $user->getEmailAuthenticationTimestamp() ) { @@ -306,6 +308,7 @@ class Preferences { wfMsg( 'emailconfirmlink' ) ) . '
'; } } else { + $disableEmailPrefs = true; $emailauthenticated = wfMsg( 'noemailprefs' ); } @@ -328,12 +331,14 @@ class Preferences { 'invert' => true, 'section' => 'personal/email', 'label-message' => 'allowemail', + 'disabled' => $disableEmailPrefs, ); $defaultPreferences['ccmeonemails'] = array( 'type' => 'toggle', 'section' => 'personal/email', 'label-message' => 'tog-ccmeonemails', + 'disabled' => $disableEmailPrefs, ); } @@ -342,24 +347,28 @@ class Preferences { 'type' => 'toggle', 'section' => 'personal/email', 'label-message' => 'tog-enotifwatchlistpages', + 'disabled' => $disableEmailPrefs, ); $defaultPreferences['enotifusertalkpages'] = array( 'type' => 'toggle', 'section' => 'personal/email', 'label-message' => 'tog-enotifusertalkpages', + 'disabled' => $disableEmailPrefs, ); $defaultPreferences['enotifminoredits'] = array( 'type' => 'toggle', 'section' => 'personal/email', 'label-message' => 'tog-enotifminoredits', + 'disabled' => $disableEmailPrefs, ); $defaultPreferences['enotifrevealaddr'] = array( 'type' => 'toggle', 'section' => 'personal/email', - 'label-message' => 'tog-enotifrevealaddr' + 'label-message' => 'tog-enotifrevealaddr', + 'disabled' => $disableEmailPrefs, ); } } diff --git a/skins/monobook/main.css b/skins/monobook/main.css index e653c47a56..9ad58430ed 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -966,6 +966,13 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { height: 1%; } +.mw-htmlform-submit { + font-weight: bold; + padding-left: .3em; + padding-right: .3em; + margin-right: 2em; +} + /* js pref toc */ #preftoc { margin: 0; @@ -1027,11 +1034,7 @@ li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { padding: 0; margin: 0; } -.prefsection fieldset { - border: 1px solid #aaa; - float: left; - margin-right: 2em; -} + .prefsection legend { font-weight: bold; } @@ -1046,12 +1049,6 @@ td.htmlform-tip { padding: .2em 2em; color: #666; } -.mw-htmlform-submit { - font-weight: bold; - padding-left: .3em; - padding-right: .3em; - margin-right: 2em; -} .preferences-login { clear: both; -- 2.20.1